package com.zc.controller;

import com.zc.pojo.User;
import com.zc.service.impl.UserServiceImpl;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.*;

/**
 * @description:
 * @author: cong
 * @create: 2024/8/2
 */
@RestController("/user")
public class UserController {
    @Autowired
    private UserServiceImpl userService;

    @GetMapping("/{id}")
    public User getUserNameById(@PathVariable int id)
    {
        return userService.getUserNameById(id);
    }
}
